package job_center

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/common/utils"
)

type JobRepositoryIface interface {
	SaveJob(ctx context.Context, po *GfyxJobPo) (*GfyxJobPo, error)
	QueryJobList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo, order string) (int64, []*GfyxJobPo, error)
	UpdateJob(ctx context.Context, condition, updates map[string]interface{}) error
	QueryJobById(ctx context.Context, jobId int64) (*GfyxJobPo, error)

	SaveJobBatchRuntime(ctx context.Context, po *GfyxJobBatchRuntimePo) (*GfyxJobBatchRuntimePo, error)
	QueryJobBatchRuntimeList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*GfyxJobBatchRuntimePo, error)
	DeleteJobBatchRuntimeByJobIds(ctx context.Context, jobIds []int64) error

	SaveJobFile(ctx context.Context, po *GfyxJobFilePo) (*GfyxJobFilePo, error)
	QueryJobFileList(ctx context.Context, condition map[string]interface{}, pageInfo *utils.PageInfo) (int64, []*GfyxJobFilePo, error)
	DeleteJobFileByJobIds(ctx context.Context, jobIds []int64) error
}
